module DesignersHelper

  def grouped_by_department(designers)
    groups = {}
    designers.each do |designer|
      groups[designer.department] ||= []
      groups[designer.department] << designer
    end
    groups
  end
end
